package com.xiao.train.business.controller;

import com.xiao.train.business.req.DailyTrainTicketQueryReq;
import com.xiao.train.business.service.DailyTrainTicketService;
import com.xiao.train.common.resp.CommonResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("daily-train-ticket")
public class DailyTrainTicketController {

    @Autowired
    DailyTrainTicketService dailyTrainTicketService;

    @GetMapping("query-list")
    public CommonResp queryList(@Valid DailyTrainTicketQueryReq req) {
        return new CommonResp(dailyTrainTicketService.queryList(req));
    }
}